/*	
 * Authors: Ken YANG <spng.yang@gmail.com>
 * 	
 * Mammoth client main program
 *
 * Copyright (C) 2007-2008 Ken YANG
 * This program is free software; you can redistribute it and/or 
 * modify it under the terms of the GNU General Public License 
 * as published by the Free Software Foundation, version 2. 
 * THIS SOFTWARE COMES "AS IS" WITHOUT ANY WARRANTIES.
 */

#if !defined (_HAVE_ERROR_H_)
#define _HAVE_ERROR_H_ 1

#include <stdio.h>
#include <stdarg.h>
#include <strings.h>
#include <syslog.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>

#define MAXLINE 4096

#ifndef __GNUC__
#define __attribute__(x) 	/* Nothing */
#endif

/* "Real" error handle, has errno */
void err_sys(const char *fmt, ...) __attribute__((noreturn)) 
			__attribute__((format(printf,1,2)));
int err_ret(const char *fmt, ...) __attribute((format(printf,1,2)));
void err_dump(const char *fmt, ...) __attribute__((noreturn)) 
			__attribute__((format(printf,1,2)));

/* "Pesudo" error handle, no errno */
void err_quit(const char *fmt, ...) __attribute__((noreturn)) 
			__attribute__((format(printf,1,2)));
int err_msg(const char *fmt, ...) __attribute__((format(printf,1,2)));


#endif
